package com.booking.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Qikai.Lin
 * @date 2023/4/23
 */
@Getter
@AllArgsConstructor
public enum UserTypeEnum {

    VISITOR("VISITOR", "游客"),
    HOMESTAY_OWNER("HOMESTAY_OWNER", "房东"),
    ADMINISTRATOR("ADMINISTRATOR", "管理员"),
    ;
    private final String type;
    private final String msg;
    public static String getMsgByType(String type) {
        for (UserTypeEnum enums : UserTypeEnum.values()) {
            if (enums.getType().equals(type)) {
                return enums.getMsg();
            }
        }
        return null;
    }
}
